package com.woniuxy.config;

import org.springframework.amqp.core.Binding;
import org.springframework.amqp.core.BindingBuilder;
import org.springframework.amqp.core.DirectExchange;
import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class RunQueueConfiguration {
    @Bean
    public Queue runQueue1(){
        return new Queue("runQueue1");
    }
    @Bean
    public DirectExchange directExchange() {
        return new DirectExchange("directExchange");
    }
    @Bean
    public Binding routeBinding1() {
        return BindingBuilder.bind(runQueue1()).to(directExchange()).with("a");
    }
}
